/* eslint-disable @typescript-eslint/no-explicit-any */
// open.ts
import { Base } from './base'
import { Request } from './request'
class open {
  /* open接口模块 */
  public static weather = {
    // 获取天气
    getLocation: (params?: any): Promise<any> =>
      Request.get('https://search.heweather.net/find', params),

    getWeather: (params?: any): Promise<any> =>
      Request.get('https://widget-api.heweather.net/s6/plugin/sticker', params)
  };

  public static link = {
    getMoyu: (params?: any): Promise<any> =>
      Request.get(`${Base.env}/api/s/moyu/list`, params),

    getHotWeibo: (params?: any): Promise<any> =>
      Request.get(`${Base.env}/api/s/hot/weibo`, params),

    getHotBaidu: (params?: any): Promise<any> =>
      Request.get(`${Base.env}/api/s/hot/baidu`, params),

    getHotZhihu: (params?: any): Promise<any> =>
      Request.get(`${Base.env}/api/s/hot/zhihu`, params),

    getHotToutiao: (params?: any): Promise<any> =>
      Request.get(`${Base.env}/api/s/hot/toutiao`, params),

    getHotToday: (params?: any): Promise<any> =>
      Request.get(`${Base.env}/api/s/hot/today`, params)
  };

  public static user = {
    login: (params?: any): Promise<any> =>
      Request.post(`${Base.env}/api/login`, params),

    resetPassword: (params?: any): Promise<any> =>
      Request.post(`${Base.env}/api/resetPassword`, params),

    registerConfirm: (params?: any): Promise<any> =>
      Request.post(`${Base.env}/api/registerConfirm`, params),

    register: (params?: any): Promise<any> =>
      Request.post(`${Base.env}/api/register`, params),

    forgetPass: (params?: any): Promise<any> =>
      Request.post(`${Base.env}/api/forgetPass`, params)
  };

  public static word = {
    getCategoryList: (params?: any): Promise<any> =>
      Request.get(`${Base.env}/api/s/word/category`, params),

    getSearch: (params?: any): Promise<any> =>
      Request.get(`${Base.env}/api/s/word/search`, params)
  };
}
export { open }
